import server from "@/utils/request"
//获取权限列表
export function getperdata() {
  return server({
    url: '/sys/permission',
    method: 'get',
  })
}
//获取角色列表
export function addper(data) {
  return server({
    url: '/sys/permission',
    method: 'post',
    data
  })
}
//根据id获取权限数据
export function getperbyid(id) {
  return server({
    url: `/sys/permission/${id}`,
    method: 'get',
  })
}
//修改角色
export function upperbyid(data) {
  return server({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}
//删除角色
export function delper(id) {
  return server({
    url: `/sys/permission/${id}`,
    method: 'delete',
  })
}